#ifndef _BASE_LOGGER_H_
#define _BASE_LOGGER_H_

#ifdef WIN32
#if !defined(DLL_STATIC)
#ifdef _DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
#else
#define DLL_EXPORT
#endif
#else
#define DLL_EXPORT
#endif
#include <string>
#include <memory>
#include <iostream>
#ifdef WIN32
#endif

/*基类抽象日志对象*/
class DLL_EXPORT BaseLogger
{
    public:
        typedef enum
        {
            TRACE = 0,
            DEBUG = 1,
            INFO = 2,
            WARN = 3,
            ERR = 4,
            CRITICAL = 5,
            OFF
        }LOG_LEVEL_E;

    public:
        virtual bool logger_register(const std::string& moduleName) = 0;
        virtual bool logger_option(const std::string& moduleName, std::uint32_t moduleLevel, bool funcIsTrace) = 0;
        virtual void logger_print(const std::string& moduleName, std::uint32_t level, const std::string& msg) = 0;
    public:
        BaseLogger(){}
        virtual ~BaseLogger() {}
};


#ifdef WIN32
#pragma warning(push)
#pragma warning(disable: 4251)
#endif
using base_logger_sptr = std::shared_ptr<BaseLogger>;
#ifdef WIN32
#pragma warning(pop)
#endif

#endif